package com.gszyxy.bigdataclass1group3.merchant.mapper;

import com.gszyxy.bigdataclass1group3.merchant.params.MerchantRequestParams;
import com.gszyxy.bigdataclass1group3.merchant.pojo.Goods;
import com.gszyxy.bigdataclass1group3.merchant.pojo.Merchant;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MerchantMapper {
    //写具体的接口
    //商家的注册
    int addMerchant(MerchantRequestParams merchantRequestParams);

    //查询商家账号在数据库中是否存在，存在就不能注册，反之就可以
    Merchant findMerchantByName(String mname);

    //商家登录
    Merchant login(MerchantRequestParams merchantRequestParams);


    //更新商家信息
    int updateMerchant(Merchant merchant);

    //商家上传
    int addGoods(Goods goods);

    //获取所有商品
    List<Goods> findAllGoods();

    List<Merchant> list();
}